import React, { Component } from 'react'

export default class App extends Component {
  fn (a, b, event) {
    console.log(a)
    console.log(b)
    console.log(event)
    console.log(this)
  }
  render() {
    return (
      <div>
        <button onClick = { (event) => {
          // 调用组件的时候外部包裹一层箭头函数，函数定义使用非箭头函数
          this.fn('1', 2, event)
        } }>事件传参</button>
      </div>
    )
  }
}
